import 'package:flutterlib/model/post/post_bean.dart';
import 'package:json_annotation/json_annotation.dart';

part 'post_detail_bean.g.dart';


@JsonSerializable()
class PostDetailBean extends Object {

  @JsonKey(name: 'categories')
  List<Categories> categories;

  @JsonKey(name: 'category_ids')
  List<int> categoryIds;

  @JsonKey(name: 'comment_count')
  int commentCount;

  @JsonKey(name: 'create_time')
  int createTime;

  @JsonKey(name: 'disallow_comment')
  bool disallowComment;

  @JsonKey(name: 'edit_time')
  int editTime;

  @JsonKey(name: 'editor_type')
  String editorType;

  @JsonKey(name: 'format_content')
  String formatContent;

  @JsonKey(name: 'full_path')
  String fullPath;

  @JsonKey(name: 'id')
  int id;

  @JsonKey(name: 'interest_id')
  int interestId;

  @JsonKey(name: 'likes')
  int likes;

  @JsonKey(name: 'meta_description')
  String metaDescription;

  @JsonKey(name: 'meta_ids')
  List<int> metaIds;

  @JsonKey(name: 'meta_keywords')
  String metaKeywords;

  @JsonKey(name: 'metas')
  List<Metas> metas;

  @JsonKey(name: 'original_content')
  String originalContent;

  @JsonKey(name: 'password')
  String password;

  @JsonKey(name: 'slug')
  String slug;

  @JsonKey(name: 'status')
  String status;

  @JsonKey(name: 'summary')
  String summary;

  @JsonKey(name: 'tag_ids')
  List<int> tagIds;

  @JsonKey(name: 'tags')
  List<Tags> tags;

  @JsonKey(name: 'template')
  String template;

  @JsonKey(name: 'thumbnail')
  String thumbnail;

  @JsonKey(name: 'title')
  String title;

  @JsonKey(name: 'top_priority')
  int topPriority;

  @JsonKey(name: 'topped')
  bool topped;

  @JsonKey(name: 'update_time')
  int updateTime;

  @JsonKey(name: 'user_id')
  int userId;

  @JsonKey(name: 'user_name')
  String userName;

  @JsonKey(name: 'user_logo')
  String userLogo;

  @JsonKey(name: 'visits')
  int visits;

  @JsonKey(name: 'word_count')
  int wordCount;

  @JsonKey(name: 'is_like')
  bool isLiked = false;

  @JsonKey(name: 'is_collect')
  bool isCollect = false;


  PostDetailBean(
      this.categories,
      this.categoryIds,
      this.commentCount,
      this.createTime,
      this.disallowComment,
      this.editTime,
      this.editorType,
      this.formatContent,
      this.fullPath,
      this.id,
      this.interestId,
      this.likes,
      this.metaDescription,
      this.metaIds,
      this.metaKeywords,
      this.metas,
      this.originalContent,
      this.password,
      this.slug,
      this.status,
      this.summary,
      this.tagIds,
      this.tags,
      this.template,
      this.thumbnail,
      this.title,
      this.topPriority,
      this.topped,
      this.updateTime,
      this.userId,
      this.userName,
      this.userLogo,
      this.visits,
      this.wordCount,
      this.isLiked,
      this.isCollect);

  factory PostDetailBean.fromJson(Map<String, dynamic> srcJson) => _$PostDetailBeanFromJson(srcJson);

  Map<String, dynamic> toJson() => _$PostDetailBeanToJson(this);

}





